Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Platform specific info as expect-actual (locale, system, version) #52

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

marcantoinefortier
Copy link
Contributor

@marcantoinefortier marcantoinefortier commented Dec 1, 2023

πŸ“– Description

Expose information about the System name & version, the Locale languageCode & regionCode as well as the app's Version name & code using expect actual implementations.

πŸ—’οΈ Notes

Providing buildConfig fields to our common android library allows us to feed the version name & version code to our androidMain implementation without having to instantiate a class in the platform modules and bubble it back up in our app entry point. (See https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-connect-to-apis.html#different-entry-points)

πŸŽ‰ Result

iOS Android
Screenshot 2023-12-01 at 16 06 07 Screenshot 2023-12-01 at 16 06 21

@marcantoinefortier marcantoinefortier force-pushed the setup/platform-info branch 3 times, most recently from 60f888a to 15982a9 Compare December 6, 2023 22:31
@marcantoinefortier marcantoinefortier merged commit 680deae into main Dec 6, 2023
1 check passed
@marcantoinefortier marcantoinefortier deleted the setup/platform-info branch December 6, 2023 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant